package com.zeroone.commons.data.es.starter;

import org.springframework.stereotype.Component;

import java.util.UUID;

@Component
public class StringUtil {

    public String generateUUID(boolean hasSymbol) {
        UUID uuid = UUID.randomUUID();
        String result = uuid.toString();
        return hasSymbol ? result : result.replace("-", "");
    }

}
